#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>
#include <string.h>

char* my_strncat(char* dest, const char* src, size_t n)
{
	char* ret = dest;
	int i = 0;
	char* start_copy = src;
	char* start_paste = dest;
	for (; *start_paste != '\0'; start_paste++)
	{
		;
	}
	for (i = 0; i < n; i++)
	{
		*start_paste = *start_copy;
		start_copy++;
		start_paste++;
	}
	return ret;
}

int main()
{
	char arr1[20] = "it is ";
	char arr2[20] = "hello world";
	my_strncat(arr1, arr2, 11);
	printf("%s\n", arr1);
	return 0;
}